home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
MacPowerオリジナル
/
Edutainment World
/
チャンプジム for DEMO
/
DIR
/
DataAccess.cst
/
00001_Script_FileIOControl Script
next >
Wrap
Text File
|
1997-09-29
|
2KB
|
99 lines
--テ゚勝オ静○ fcOpen( filename)
-- filename..テ゚勝ñコ
--テ゚勝オ静○ fcOpenR( filename)
-- ナiìォヌ帷ûヌ幀ヘópナj filename..テ゚勝ñコ
--テ゚勝゙\©\ fcClose()
--ッ\請ìォヌ帷ûヌ fcRead()
--ッ\請齏ヌエ鍄ヌ fcWrite( buf)
-- buf..齏ヌエ鍄ヌ屏\リテ゚
--テ゚勝醂顫 fcDelete()
global gFileHandles
---------------
-- FILE OPEN --
---------------
on fcOpen filename
put FileIO(mNew,"write",filename) into gFileHandles
if ObjectP(gFileHandles) = false then return -1
return 0
end fcOpen
--------------------------
-- FILE OPEN (ReadOnly) --
--------------------------
on fcOpenR filename
put FileIO(mNew,"read",filename) into gFileHandles
if ObjectP(gFileHandles) = false then return -1
return 0
end fcOpen
----------------
-- FILE CLOSE --
----------------
on fcClose
gFileHandles(mDispose)
return 0
end fcClose
-----------------
-- FILE LENGTH --
-----------------
on fcFileLength
return gFileHandles(mGetLength)
end fcFileLength
----------------
-- FILE WRITE --
----------------
on fcWrite buf
set res = gFileHandles(mWriteString,buf)
return res
end fcWrite
--------------
-- FILE READ --
--------------
on fcRead
set rbuf = ""
set rbuf = gFileHandles(mReadFile)
return rbuf
end fcReadFile
--------------------
-- FILE READ LINE--
--------------------
on fcReadLine
set rbuf = ""
set rbuf = gFileHandles(mReadLine)
return rbuf
end fcReadFile
----------------
-- FILE DELETE --
----------------
on fcDelete
gFileHandles(mDelete)
return 0
end fcDelete